package de.gwtprime.shared.requestFactory.request;

import com.google.web.bindery.requestfactory.shared.InstanceRequest;
import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.Service;

import de.gwtprime.server.model.Answer;
import de.gwtprime.server.model.MyServiceLocator;
import de.gwtprime.shared.requestFactory.AnswerProxy;
import de.gwtprime.shared.requestFactory.User2Proxy;
import de.gwtprime.shared.requestFactory.VoteAnswerCompletedProxy;
import de.gwtprime.shared.requestFactory.VoteAnswerProxy;

@Service(value = Answer.class, locator = MyServiceLocator.class)
public interface AnswerRequest extends RequestContext {


	Request<AnswerProxy> findAnswer(Long id);
	
	InstanceRequest<AnswerProxy, Long> persist();

	InstanceRequest<AnswerProxy, Void> remove();
	
	
	InstanceRequest<AnswerProxy, AnswerProxy> addToQuestion(Long questionId);
	
	// Votes
	InstanceRequest<AnswerProxy, Void> addVoteAndPersist(VoteAnswerProxy section, User2Proxy user);
	
	InstanceRequest<AnswerProxy, Void> addVoteAnswerCompleteAndPersist(VoteAnswerCompletedProxy answer, User2Proxy user);
	
	
}
